
Component({
  data: {
    url: null
  },
  methods: {
    onLoad(option) {
      const { title = '' } = option
      wx.setNavigationBarTitle({
        title: decodeURI(title)
      })
      if (option.url) {
        this.setData({
          url: decodeURIComponent(option.url)
        });
        console.log("url", this.data.url)
      }
    },
    handleMessage(v) {
      console.log('v', v);
      const eventChannel = this.getOpenerEventChannel();
      eventChannel.emit('webViewSuccess', {data: 'test'});
    }
  }
})
